package com.zy.mapper;

import com.zy.entity.User;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author LittleDesire
 * @description
 * @date 2022-03-30 周三 12:58
 * @since 17
 */
@Service
public interface UserMapper {
    @Select("select * from t_user")
    List<User> queryAll();

    int login(@Param("account") String account, @Param("passwd") String password);

    @Select("select passwd from t_user where account = #{account}")
    public String queryPassword(String account);

    public int updatePassword(@Param("account") String account, @Param("passwd") String password);


    @Select("select * from t_user where account = #{account}")
    public User queryByAcoount(String account);
}
